{template '_header'}
{php $this->followBar()}
<title>商品详情</title>
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/groups/template/mobile/default/css/style.css" />
<style type="text/css">
	.creditshop-detail-page .fui-navbar .abtn{height:2.6rem;width:40%;font-size:12px;-webkit-border-radius: 0;border-radius: 0;padding:0.5rem 0 0 0;display: block;float:left;
		line-height: 0.8rem;}
	.creditshop-detail-page .fui-navbar .homeabtn{height:2.6rem;width:20%;font-size:12px;-webkit-border-radius: 0;border-radius: 0;margin:0;padding:0;display: block;float:left;background: #fff;
		color:#666;border:none;line-height: 2.6rem;}
	.homeabtn .icon{font-size:1rem;}
	.text-danger span{color:#ef4f4f;font-size:1rem;}
</style>
<div class='fui-page creditshop-detail-page'>
	{if is_h5app()}
	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back"></a>
		</div>
		<div class="title">{php echo m('plugin')->getName('groups')}</div>
		<div class="fui-header-right"></div>
	</div>
	{else}
	<a href="{php echo mobileUrl('order')}" class="iconfont icon lynn_back_icon back">&#xe755;</a>
	{/if}

	<div class='fui-content'>
		{if !is_mobile()}<div class="pcshop-index">{/if}
		<div class="fui-swipe" data-speed="5000" data-gap="5">
			<div class="fui-swipe-wrapper">
				{loop $goods['thumb_url'] $thumb}
				<div class="fui-swipe-item"><img src="{php echo tomedia($thumb)}" alt="{$goods['title']}" onerror="this.src='../addons/ewei_shopv2/static/images/nopic100.jpg'"></div>
				{/loop}
			</div>
			<div class="fui-swipe-page">
				{loop $goods['thumb_url'] $thumb}
				<div class="fui-swipe-bullet"></div>
				{/loop}
			</div>
		</div>
		<div class="lynn_goods_head">
			<h2 class="lynn_goods_head_title">
				<span>{$goods['groupnum']}人成团</span>{$goods['title']}
			</h2>
			<span class="lynn_goods_follow" style="display: none;">
				<i class="iconfont icon">&#xe606;</i><i class="iconfont icon on">&#xe605;</i>收藏
			</span>
			{if !empty($goods['description'])}
			<p class="lynn_goods_head_subtitle">
				{$goods['description']}
			</p>
			{/if}
			<div class="lynn_goods_head_info">
				¥ <strong>{$goods['groupsprice']}</strong>/{if $goods['units']}{$goods['goodsnum']}{$goods['units']}{else}1件{/if} <del>¥ {$goods['price']}</del>
				<span class="fr">
					已有<b>{$goods['fightnum']}</b>人参团，销量<b>{$goods['sales']}</b>
				</span>
				<div style="clear:both;"></div>
			</div>
			{if !empty($goods['isdiscount'])}
			<div class="lynn_goods_discount">
				【团长优惠 <span>{if $goods['headstype']==0} ¥{$goods['headsmoney']}{elseif $goods['headstype']==1}{php echo number_format($goods['headsdiscount'] / 10,1)}折{/if}</span>】
			</div>
			{/if}
		</div>
		<div class="lynn_goods_invitation">
			*开团并邀请{php echo $goods['groupnum']-1}人参团，人数不足自动退款，详见<a href="{php echo mobileUrl('groups/team/rules')}">拼团玩法</a>
		</div>
		<div class="lynn_goods_content">
			<div class="lynn_goods_content_title"><span>图文详情</span></div>
			<div class="lynn_goods_content_info content-images" id="content">
				<!-- {if $groupsset['description']} -->
					<!-- {php echo htmlspecialchars_decode($groupsset['groups_description'])} -->
				<!-- {else} -->
					<!-- {php echo htmlspecialchars_decode($goods['content'])} -->
					{php echo $goods['content']}
				<!-- {/if} -->
			</div>
		</div>
		<div style="height:2.5rem;"></div>
		{if !is_mobile()}</div>{/if}
	</div>
	<div class="fui-navbar bordert" style="z-index:100;padding:0;">
		<a class="homeabtn btn btn-warning {if empty($goods['stock'])}disabled{/if} external" style="" href="{php echo mobileUrl('groups')}">
			<p class="icon icon-home1"></p>
		</a>
		<a class="lynn_goods_btn lynn_btn_waring btn-single" href="javascript:void(0);">
			<p>{if $goods['single']}¥ <strong>{$goods['singleprice']}</strong>{else}<br />{/if}</p> 单独购买
		</a>
		<a class="lynn_goods_btn lynn_btn_danger" data-nocache="true" href="{php echo mobileUrl('groups/goods/openGroups',array('id'=>$goods['id']))}">
			<p>¥ <strong>{$goods['groupsprice']}</strong></p> {$goods['groupnum']}人成团
		</a>
	</div>
</div>
<script language='javascript'>
	require(['../addons/ewei_shopv2/plugin/groups/static/js/goods.js'], function (modal) {
	modal.init({$goods['id']});
});
</script>
{template '_footer'}